<?php
namespace app\admin\validate;
use think\Validate;

class Login extends Validate{
	protected $rule=[
		'title'=>'require|max:25',
		'url'=>'require|url',
	];

	protected $message=[
		'title.require'=>'标题必须填写',
		'title.max'=>'标题最大25个字符',
		'url.require'=>'url必须填写',
	];

	protected $scene=[
		// 'add'=>['username'=>'require','password'], //限定在添加数据的时候只校验是否为空，不校验长度
		'add'=>['title','url'],
		'edit'=>['title','url'],
	];
}


?>